﻿using System;
using ITViet.Domains;
using ITViet.Services;
using ITViet.Web.App_Code;

namespace ITViet.Web.Controls
{
  public partial class HomeIntroduction : BaseControl
  {
    protected void Page_Load(object sender, EventArgs e)
    {
      if (!Page.IsPostBack && !Page.IsCallback)
      {
        LoadInfo();
      }
    }

    private void LoadInfo()
    {
      SelectedSubMenuItemTitle = string.Empty;
      #region Company intro
      TList<HtmlContent> htmlContentList = new HtmlContentService().GetIntroAtHomePage(CurrentLanguage.Id);
      if (htmlContentList.Count > 0)
      {
        ltrCompanyIntro.Text = htmlContentList[0].Summary;
      }
      #endregion
    }
  }
}